<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=EDGE">
<title>用户登录</title>
</head>

<link rel="stylesheet" type="text/css" href="jsPlugin/semantic/semantic.min.css">
<link rel="stylesheet" type="text/css" href="css/login.jsp.css">

<script src="js/jquery.min.js"></script>
<script src="jsPlugin/semantic/semantic.min.js"></script>
<script type="text/javascript">
window.onload=function(){
	
	//判断操作系统位数
	function getCPU()

    {

       var agent=navigator.userAgent.toLowerCase();

       if(agent.indexOf("win64")>=0||agent.indexOf("wow64")>=0) return "x64";

       return "x86";

    }
	function _getCPU(){
		
		D
	}

	if(navigator.userAgent.indexOf("MSIE")>0){   
	      if(navigator.userAgent.indexOf("MSIE 6.0")>0){   
	          alert("IE版本低,请升级!");    
	    	  location.href = "downloadIE/"+getCPU();
	      }   
	      if(navigator.userAgent.indexOf("MSIE 7.0")>0){  
	    	  alert("IE版本低,请升级!");    
	    	  location.href = "downloadIE/"+getCPU();
	      }   
	      if(navigator.userAgent.indexOf("MSIE 9.0")>0 && !window.innerWidth){//这里是重点，你懂的
	        //alert("ie8");  
	      }
	      if(navigator.userAgent.indexOf("MSIE 8.0")>0 ){//这里是重点，你懂的
		      //  alert("ie8");  
		  } 
	      if(navigator.userAgent.indexOf("MSIE 9.0")>0){  
	       // alert("ie9");  
	      }   
	    }
	
	$('.submit').on('click',function(){
		login();
	})
	 
document.onkeypress = function(event){
		 var e = event || window.event || arguments.callee.caller.arguments[0];
		 
		  if (e.keyCode == 13) {
			  login();
		  }
	  } 
	$('#form').form({
		fields : {
			name : {
				identifier : 'username',
				rules : [ {
					type : 'empty',
					prompt : '请输入用户名'
				} ]
			},
			pwd : {
				identifier : 'password',
				rules : [ {
					type : 'empty',
					prompt : '密码不能为空'
				} ]
			}
		},
		//inline : true,
		on : 'blur'
	});
	  
	  
	var ss = '${msg}';
	if(ss){
		$('#msg').text(ss);
		$('#msg').css("display","block");
	}
}
//ie6不能登录的问题

function login()
{
    document.getElementById("form").submit();    
}

</script>
<body>

<div class="ui middle aligned center aligned grid" style="height: 100%;">
  <div class="column" style="max-width: 450px;">
    <h2 class="ui image header">
      <img src="images/logo.png" class="image">
      <div class="content" >
        兰州市公安局办公室督办管理系统
      </div>
    </h2>
    <form class="ui large form" action="login" method="post" id="form">
      <div class="ui stacked segment">
        <div class="field" style="background: #fff;">
          <div class="ui left icon input">
            <i class="user icon"></i>
            <input type="text" name="username" placeholder="用户名">
          </div>
        </div>
        <div class="field" style="background: #fff;">
          <div class="ui left icon input">
            <i class="lock icon"></i>
            <input type="password" name="password" placeholder="密码">
          </div>
        </div>
         <input type="hidden" name="submit_type" value="supervise">
        <button class="ui fluid large blue submit button" style="
    background-color: #1678c2 !important;">登录</button>
      </div>

      <div class="ui error message" id="msg"></div>
    </form>

			<!-- <div class="layui-form layui-form-pane layui-box">
				<form method="post">
					<div class="layui-form-item">
						<label for="L_email" class="layui-form-label">邮箱</label>
						<div class="layui-input-block">
							<input type="text" id="L_email" name="email" required=""
								lay-verify="required" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label for="L_pass" class="layui-form-label">密码</label>
						<div class="layui-input-block">
							<input type="password" id="L_pass" name="pass" required=""
								lay-verify="required" autocomplete="off" class="layui-input">
						</div>
					</div>
				
					<div class="layui-form-item">
						<button class="layui-btn" lay-filter="*" lay-submit="">立即登录</button>
					
					</div>
				
				</form>
			</div> -->

		</div>
</div>


<script type="text/javascript">

var browser = navigator.appName
var b_version = navigator.appVersion
var version = b_version.split(";");
var trim_Version = version[1].replace(/[ ]/g, "");

var l = (window.screen.width )/2;
var t = (window.screen.height  )/2;
if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE8.0") { $('.column').css('margin-top', '15%').css('margin-left', '35%');}
if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE9.0") { $('.column').css('margin-top', '12%').css('margin-left', '35%');}
if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE7.0") { $('.column').css('margin-top', '12%').css('margin-left', '35%');}
if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE6.0") { $('.column').css('margin-top', '12%').css('margin-left', '35%');}
if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE6.0") { $('.column').css('margin-top', '12%').css('margin-left', '35%');}
</script>

</body>
</html>